<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Caixa-1.0.2: Código-Fonte de src/imprimir.C</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gerado por Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="main.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Estruturas&nbsp;de&nbsp;Dados</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Globais</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>src/imprimir.C</h1>  </div>
</div>
<div class="contents">
<a href="imprimir_8C.html">Vá para a documentação deste arquivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//           imprimir.C</span>
<a name="l00002"></a>00002 <span class="comment">//  Qua julho 13 07:56:42 2011</span>
<a name="l00003"></a>00003 <span class="comment">//  Copyright  2011  Alcione Ferreira</span>
<a name="l00004"></a>00004 <span class="comment">//  &lt;user@host&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="imprimir_8h.html">imprimir.h</a>&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a><a class="code" href="classPrintFormOperation.html#a4b1439533b55961c6c3114c63ed33eb4">00008</a> <a class="code" href="classPrintFormOperation.html#a4b1439533b55961c6c3114c63ed33eb4">PrintFormOperation::PrintFormOperation</a>()
<a name="l00009"></a>00009     {
<a name="l00010"></a>00010     }
<a name="l00011"></a>00011 
<a name="l00012"></a><a class="code" href="classPrintFormOperation.html#a8677c2b7e07c33e83deb11a200f62ab7">00012</a> <a class="code" href="classPrintFormOperation.html#a8677c2b7e07c33e83deb11a200f62ab7">PrintFormOperation::~PrintFormOperation</a>()
<a name="l00013"></a>00013     {
<a name="l00014"></a>00014     }
<a name="l00015"></a>00015 
<a name="l00016"></a><a class="code" href="classPrintFormOperation.html#a85020e0c5d4fb001a496b0dd95a9e7b4">00016</a> Glib::RefPtr&lt;PrintFormOperation&gt; <a class="code" href="classPrintFormOperation.html#a85020e0c5d4fb001a496b0dd95a9e7b4">PrintFormOperation::create</a>()
<a name="l00017"></a>00017     {
<a name="l00018"></a>00018     <span class="keywordflow">return</span> Glib::RefPtr&lt;PrintFormOperation&gt;(<span class="keyword">new</span> <a class="code" href="classPrintFormOperation.html#a4b1439533b55961c6c3114c63ed33eb4">PrintFormOperation</a>());
<a name="l00019"></a>00019     }
<a name="l00020"></a>00020 
<a name="l00021"></a><a class="code" href="classPrintFormOperation.html#ab690e926a88fe66c5e3032123d306c32">00021</a> <span class="keywordtype">void</span> <a class="code" href="classPrintFormOperation.html#ab690e926a88fe66c5e3032123d306c32">PrintFormOperation::set_cabecalho</a>() 
<a name="l00022"></a>00022     {
<a name="l00023"></a>00023     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a>.clear(); 
<a name="l00024"></a>00024     Glib::ustring Texto, AUX;
<a name="l00025"></a>00025     <span class="keywordtype">int</span> deslocar, i;
<a name="l00026"></a>00026 
<a name="l00027"></a>00027     Texto.clear();
<a name="l00028"></a>00028     Texto = <span class="stringliteral">&quot;          TABELIONATO OLIVEIRA&quot;</span>;
<a name="l00029"></a>00029     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> = <span class="stringliteral">&quot;&lt;span size=&#39;12288&#39;&gt;&lt;b&gt;&quot;</span>+Texto+<span class="stringliteral">&quot;&lt;/b&gt;&lt;/span&gt;\n&quot;</span>;
<a name="l00030"></a>00030     Texto.clear();
<a name="l00031"></a>00031     Texto = <span class="stringliteral">&quot;               Bel. Marcelino Cesar Medeiros de Oliveira&quot;</span>;
<a name="l00032"></a>00032     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> += Texto+<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00033"></a>00033     Texto.clear();
<a name="l00034"></a>00034     Texto = <span class="stringliteral">&quot;                               CPF: 174.630.841-91&quot;</span>;
<a name="l00035"></a>00035     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> += Texto+<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00036"></a>00036     Texto.clear();
<a name="l00037"></a>00037     Texto = <span class="stringliteral">&quot;   Tabelião de Protesto de Títulos - 3º Tabelião de Notas&quot;</span>;
<a name="l00038"></a>00038     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> += Texto+<span class="stringliteral">&quot;\n&quot;</span>;            
<a name="l00039"></a>00039     Texto.clear();
<a name="l00040"></a>00040     Texto = <span class="stringliteral">&quot;       Av. Presidente Vargas, 329 Centro - Dourados-MS&quot;</span>;
<a name="l00041"></a>00041     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> += Texto+<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00042"></a>00042     Texto.clear();
<a name="l00043"></a>00043     Texto = <span class="stringliteral">&quot;   CEP 79804-030 - Fones: (67) 3422-5311 / 2108-2550&quot;</span>; 
<a name="l00044"></a>00044     this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a> += Texto+<span class="stringliteral">&quot;\n\n&quot;</span>;
<a name="l00045"></a>00045     }
<a name="l00046"></a><a class="code" href="classPrintFormOperation.html#ac364bc3563e45d35f3a46310b0bc5269">00046</a> <span class="keywordtype">void</span> <a class="code" href="classPrintFormOperation.html#ac364bc3563e45d35f3a46310b0bc5269">PrintFormOperation::set_corpo</a>(<span class="keywordtype">int</span> tipo, <span class="keywordtype">string</span> data, <span class="keywordtype">int</span> recibo) 
<a name="l00047"></a>00047     { 
<a name="l00048"></a>00048     BANCO *banco;
<a name="l00049"></a>00049     <span class="keywordtype">string</span> SQL, TP, REC, func, deb_cred, AUX2;
<a name="l00050"></a>00050     Glib::ustring AUX;
<a name="l00051"></a>00051     <span class="keywordtype">char</span> *aux, *sql;
<a name="l00052"></a>00052     <span class="keywordtype">int</span> tp_nat,i,j,tam,qtd;
<a name="l00053"></a>00053     <span class="keywordtype">float</span> tt, tt_liq, desc, valor[4], imp[2], aux_f;
<a name="l00054"></a>00054     <span class="keywordtype">bool</span> fj10;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056     imp[0] = 0.0;
<a name="l00057"></a>00057     imp[1] = 0.0;
<a name="l00058"></a>00058     aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[10];
<a name="l00059"></a>00059     itoa(tipo,aux,10);
<a name="l00060"></a>00060     TP.clear();
<a name="l00061"></a>00061     <span class="keywordflow">if</span> (tipo == 3)
<a name="l00062"></a>00062         {
<a name="l00063"></a>00063         TP = <span class="stringliteral">&quot;1&quot;</span>;
<a name="l00064"></a>00064         }
<a name="l00065"></a>00065     <span class="keywordflow">else</span>
<a name="l00066"></a>00066         {
<a name="l00067"></a>00067         TP.append(aux);
<a name="l00068"></a>00068         }
<a name="l00069"></a>00069     <span class="keyword">delete</span> aux;
<a name="l00070"></a>00070     aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00071"></a>00071     itoa(recibo,aux,10);
<a name="l00072"></a>00072     REC.clear();
<a name="l00073"></a>00073     REC.append(aux);
<a name="l00074"></a>00074     <span class="keyword">delete</span> aux;
<a name="l00075"></a>00075     banco = <span class="keyword">new</span> BANCO(CONF_FILE);
<a name="l00076"></a>00076     SQL.clear();
<a name="l00077"></a>00077     SQL = <span class="stringliteral">&quot;select lancamentos.e_s, lancamentos.rec, lancamentos.data, lancamentos.desconto, lancamentos.total, lancamentos.total_liq, lancamentos.tipo, lancamentos.data_p, lancamentos.protocolo, clientes.nome, clientes.endereco, clientes.documento, clientes.tipo_doc, funcionario.u_login, lancamentos.data_qt &quot;</span>;
<a name="l00078"></a>00078     SQL += <span class="stringliteral">&quot;from caixa.lancamentos inner join cadastro.clientes on lancamentos.cod_cli=clientes.cod_cli inner join cadastro.funcionario on lancamentos.cod_fun=funcionario.cod_fun &quot;</span>;
<a name="l00079"></a>00079     SQL += <span class="stringliteral">&quot;where lancamentos.e_s=&quot;</span>+TP+<span class="stringliteral">&quot; and lancamentos.rec=&quot;</span>+REC+<span class="stringliteral">&quot; and lancamentos.data=&#39;&quot;</span>+data+<span class="stringliteral">&quot;&#39; and lancamentos.status&quot;</span>;
<a name="l00080"></a>00080     sql = <span class="keyword">new</span> <span class="keywordtype">char</span>[SQL.length()+1];
<a name="l00081"></a>00081     strcpy(sql,SQL.c_str());
<a name="l00082"></a>00082     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.clear();
<a name="l00083"></a>00083     <span class="comment">//cout &lt;&lt; sql &lt;&lt; endl;</span>
<a name="l00084"></a>00084     banco-&gt;executar(sql,0);
<a name="l00085"></a>00085     <span class="keyword">delete</span> sql;
<a name="l00086"></a>00086     <span class="keywordflow">if</span> (banco-&gt;query_result == 3)
<a name="l00087"></a>00087         {
<a name="l00088"></a>00088         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> = banco-&gt;mensagem;
<a name="l00089"></a>00089         }
<a name="l00090"></a>00090     <span class="keywordflow">else</span>
<a name="l00091"></a>00091         {
<a name="l00092"></a>00092         <span class="keywordflow">if</span> (banco-&gt;registros &gt; 0)
<a name="l00093"></a>00093             {
<a name="l00094"></a>00094             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;span size=&#39;9216&#39;&gt;&lt;b&gt;RECIBO&lt;/b&gt;   (&quot;</span>;
<a name="l00095"></a>00095             deb_cred.clear();
<a name="l00096"></a>00096             deb_cred.append(banco-&gt;resultado(0,6));
<a name="l00097"></a>00097             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>+=deb_cred;
<a name="l00098"></a>00098             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;)   &quot;</span>;
<a name="l00099"></a>00099             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[data.length()+1];
<a name="l00100"></a>00100             strcpy(aux,data.c_str());
<a name="l00101"></a>00101             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(data_formatada(aux,2));
<a name="l00102"></a>00102             <span class="keyword">delete</span> aux;
<a name="l00103"></a>00103             <span class="keywordflow">if</span> (deb_cred.compare (<span class="stringliteral">&quot;D&quot;</span>) == 0)
<a name="l00104"></a>00104                 {
<a name="l00105"></a>00105                 tam = strlen(banco-&gt;resultado(0,14));
<a name="l00106"></a>00106                 <span class="keywordflow">if</span> (tam &gt; 0 )
<a name="l00107"></a>00107                     {
<a name="l00108"></a>00108                     aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[tam+1];
<a name="l00109"></a>00109                     strcpy(aux,banco-&gt;resultado(0,14));
<a name="l00110"></a>00110                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;   &quot;</span>;
<a name="l00111"></a>00111                     this-&gt;m_corpo.append(data_formatada(aux,2));
<a name="l00112"></a>00112                     <span class="keyword">delete</span> aux;
<a name="l00113"></a>00113                     }
<a name="l00114"></a>00114                 }
<a name="l00115"></a>00115             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;/span&gt;\n&quot;</span>;
<a name="l00116"></a>00116             <span class="keywordflow">if</span> (strcmp(banco-&gt;resultado(0,7),<span class="stringliteral">&quot;&quot;</span>) != 0)
<a name="l00117"></a>00117                 {
<a name="l00118"></a>00118                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;span size=&#39;8192&#39;&gt;Protocolo: &quot;</span>;
<a name="l00119"></a>00119                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(banco-&gt;resultado(0,8));
<a name="l00120"></a>00120                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; Data: &quot;</span>;
<a name="l00121"></a>00121                 aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[strlen(banco-&gt;resultado(0,7))+1];
<a name="l00122"></a>00122                 strcpy(aux,banco-&gt;resultado(0,7));
<a name="l00123"></a>00123                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(data_formatada(aux,2));
<a name="l00124"></a>00124                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;/span&gt;\n&quot;</span>;
<a name="l00125"></a>00125                 }
<a name="l00126"></a>00126             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;span size=&#39;7168&#39;&gt;  \n&quot;</span>;
<a name="l00127"></a>00127             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(banco-&gt;resultado(0,9));
<a name="l00128"></a>00128             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\n  &quot;</span>;
<a name="l00129"></a>00129             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(banco-&gt;resultado(0,10));
<a name="l00130"></a>00130             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\n  &quot;</span>;
<a name="l00131"></a>00131             tp_nat = atoi(banco-&gt;resultado(0,12));
<a name="l00132"></a>00132             <span class="keywordflow">if</span> (tp_nat != 0)
<a name="l00133"></a>00133                 {
<a name="l00134"></a>00134                 aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[strlen(banco-&gt;resultado(0,11))+1];
<a name="l00135"></a>00135                 strcpy(aux,banco-&gt;resultado(0,11));
<a name="l00136"></a>00136                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(masc_doc(aux,tp_nat,2));
<a name="l00137"></a>00137                 <span class="keyword">delete</span> aux;
<a name="l00138"></a>00138                 }
<a name="l00139"></a>00139             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\n&lt;/span&gt;\n&quot;</span>;
<a name="l00140"></a>00140             func.clear();
<a name="l00141"></a>00141             func = banco-&gt;resultado(0,13);
<a name="l00142"></a>00142             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00143"></a>00143             strcpy(aux,banco-&gt;resultado(0,4));
<a name="l00144"></a>00144             strcpy(aux,valor_formatado(aux,2).c_str());
<a name="l00145"></a>00145             tt = atof(aux);
<a name="l00146"></a>00146             <span class="keyword">delete</span> aux;
<a name="l00147"></a>00147             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00148"></a>00148             strcpy(aux,banco-&gt;resultado(0,5));
<a name="l00149"></a>00149             strcpy(aux,valor_formatado(aux,2).c_str());         
<a name="l00150"></a>00150             tt_liq = atof(aux);
<a name="l00151"></a>00151             <span class="keyword">delete</span> aux;
<a name="l00152"></a>00152             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00153"></a>00153             strcpy(aux,banco-&gt;resultado(0,3));
<a name="l00154"></a>00154             strcpy(aux,valor_formatado(aux,2).c_str()); 
<a name="l00155"></a>00155             desc = atof(aux);
<a name="l00156"></a>00156             <span class="keyword">delete</span> aux;
<a name="l00157"></a>00157             SQL.clear();
<a name="l00158"></a>00158             SQL = <span class="stringliteral">&quot;select servicos.descricao, entrada.qtd, entrada.valor, entrada.total, entrada.total_liq, entrada.desconto, servicos.f10, entrada.funjecc10, entrada.issqn &quot;</span>;
<a name="l00159"></a>00159             SQL += <span class="stringliteral">&quot;from caixa.entrada inner join cadastro.servicos on entrada.cod_serv=servicos.cod_serv &quot;</span>;
<a name="l00160"></a>00160             SQL += <span class="stringliteral">&quot;where entrada.e_s=&quot;</span>+TP+<span class="stringliteral">&quot; and entrada.rec=&quot;</span>+REC+<span class="stringliteral">&quot; and entrada.data=&#39;&quot;</span>+data+<span class="stringliteral">&quot;&#39; order by servicos.codigo&quot;</span>;
<a name="l00161"></a>00161             sql = <span class="keyword">new</span> <span class="keywordtype">char</span>[SQL.length()+1];
<a name="l00162"></a>00162             <span class="comment">//cout &lt;&lt; SQL &lt;&lt; endl;</span>
<a name="l00163"></a>00163             strcpy(sql,SQL.c_str());
<a name="l00164"></a>00164             banco-&gt;executar(sql,0);
<a name="l00165"></a>00165             <span class="keyword">delete</span> sql;
<a name="l00166"></a>00166             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;QTD\tDescrição\t\t\t\tValor\n&quot;</span>;
<a name="l00167"></a>00167             <span class="keywordflow">if</span> (banco-&gt;query_result == 3)
<a name="l00168"></a>00168                 {
<a name="l00169"></a>00169                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += banco-&gt;mensagem;
<a name="l00170"></a>00170                 }
<a name="l00171"></a>00171             <span class="keywordflow">else</span>
<a name="l00172"></a>00172                 {
<a name="l00173"></a>00173                 <span class="keywordflow">if</span> (banco-&gt;registros &gt; 0)
<a name="l00174"></a>00174                     {
<a name="l00175"></a>00175                     valor[3] = 0.0;
<a name="l00176"></a>00176                     fj10 = <span class="keyword">false</span>;
<a name="l00177"></a>00177                     <span class="keywordflow">for</span> (i=0; i &lt; banco-&gt;registros; i++)
<a name="l00178"></a>00178                         {
<a name="l00179"></a>00179                         aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00180"></a>00180                         strcpy(aux,banco-&gt;resultado(i,1));
<a name="l00181"></a>00181                         AUX.clear();
<a name="l00182"></a>00182                         AUX = casa_milhar(aux,1);
<a name="l00183"></a>00183                         <span class="keyword">delete</span> aux;
<a name="l00184"></a>00184                         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>+=AUX+<span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00185"></a>00185                         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>.append(banco-&gt;resultado(i,0));
<a name="l00186"></a>00186                         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00187"></a>00187                         tam = strlen(banco-&gt;resultado(i,0));
<a name="l00188"></a>00188                         cout &lt;&lt; tam &lt;&lt; endl;
<a name="l00189"></a>00189                         <span class="keywordflow">if</span> (tam &lt; 25)
<a name="l00190"></a>00190                             {
<a name="l00191"></a>00191                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00192"></a>00192                             <span class="keywordflow">if</span> ((tam &lt;= 13) || (tam &lt;= 12))
<a name="l00193"></a>00193                                 {
<a name="l00194"></a>00194                                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00195"></a>00195                                 }
<a name="l00196"></a>00196                             <span class="keywordflow">if</span> (tam == 10)
<a name="l00197"></a>00197                                 {
<a name="l00198"></a>00198                                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00199"></a>00199                                 }
<a name="l00200"></a>00200                             <span class="keywordflow">if</span> ((tam == 9)||(tam == 8))
<a name="l00201"></a>00201                                 {
<a name="l00202"></a>00202                                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00203"></a>00203                                 }
<a name="l00204"></a>00204                             <span class="keywordflow">if</span> (tam &lt; 9)
<a name="l00205"></a>00205                                 {
<a name="l00206"></a>00206                                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>;
<a name="l00207"></a>00207                                 }
<a name="l00208"></a>00208                             }
<a name="l00209"></a>00209                         aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00210"></a>00210                         strcpy(aux,banco-&gt;resultado(i,2));
<a name="l00211"></a>00211                         strcpy(aux,valor_formatado(aux,2).c_str());
<a name="l00212"></a>00212                         valor[0] = atof(aux);
<a name="l00213"></a>00213                         <span class="keyword">delete</span> aux;
<a name="l00214"></a>00214                         aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00215"></a>00215                         strcpy(aux,banco-&gt;resultado(i,3));
<a name="l00216"></a>00216                         strcpy(aux,valor_formatado(aux,2).c_str());                     
<a name="l00217"></a>00217                         valor[1] = atof(aux);
<a name="l00218"></a>00218                         <span class="keyword">delete</span> aux;
<a name="l00219"></a>00219                         aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00220"></a>00220                         strcpy(aux,banco-&gt;resultado(i,5));
<a name="l00221"></a>00221                         strcpy(aux,valor_formatado(aux,2).c_str());                     
<a name="l00222"></a>00222                         valor[2] = atof(aux);
<a name="l00223"></a>00223                         <span class="keyword">delete</span> aux;
<a name="l00224"></a>00224                         valor[3] += (valor[1] + valor[2]) - valor[0];
<a name="l00225"></a>00225                         <span class="comment">//cout &lt;&lt; valor[3] &lt;&lt; &quot;=(&quot; &lt;&lt; valor[1] &lt;&lt; &quot;+&quot; &lt;&lt; valor[2] &lt;&lt; &quot;)-&quot; &lt;&lt; valor[0] &lt;&lt; endl;</span>
<a name="l00226"></a>00226                         aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00227"></a>00227                         sprintf(aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,valor[0]);
<a name="l00228"></a>00228                         AUX.clear();
<a name="l00229"></a>00229                         AUX = casa_milhar(aux,0);
<a name="l00230"></a>00230                         <span class="keyword">delete</span> aux;
<a name="l00231"></a>00231                         tam = AUX.length();
<a name="l00232"></a>00232                         <span class="keywordflow">if</span> (tam == 4)
<a name="l00233"></a>00233                             {
<a name="l00234"></a>00234                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00235"></a>00235                             }
<a name="l00236"></a>00236                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00237"></a>00237                             {
<a name="l00238"></a>00238                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00239"></a>00239                             }
<a name="l00240"></a>00240                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00241"></a>00241                             {
<a name="l00242"></a>00242                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00243"></a>00243                             }
<a name="l00244"></a>00244                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00245"></a>00245                             {
<a name="l00246"></a>00246                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00247"></a>00247                             }
<a name="l00248"></a>00248                         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += AUX;
<a name="l00249"></a>00249                         this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> +=<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00250"></a>00250                         <span class="keywordflow">if</span> (strcmp(banco-&gt;resultado(i,6),<span class="stringliteral">&quot;t&quot;</span>) == 0)
<a name="l00251"></a>00251                             {
<a name="l00252"></a>00252                             fj10 = <span class="keyword">true</span>;
<a name="l00253"></a>00253                             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00254"></a>00254                             strcpy(aux,banco-&gt;resultado(i,7));
<a name="l00255"></a>00255                             strcpy(aux,valor_formatado(aux,2).c_str());                     
<a name="l00256"></a>00256                             aux_f = atof(aux);
<a name="l00257"></a>00257                             <span class="keyword">delete</span> aux;
<a name="l00258"></a>00258                             imp[0] += aux_f;
<a name="l00259"></a>00259                             aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00260"></a>00260                             strcpy(aux,banco-&gt;resultado(i,8));
<a name="l00261"></a>00261                             strcpy(aux,valor_formatado(aux,2).c_str());                     
<a name="l00262"></a>00262                             aux_f = atof(aux);
<a name="l00263"></a>00263                             <span class="keyword">delete</span> aux;
<a name="l00264"></a>00264                             imp[1] += aux_f;
<a name="l00265"></a>00265                             }
<a name="l00266"></a>00266                         }
<a name="l00267"></a>00267                     }
<a name="l00268"></a>00268                 <span class="keywordflow">else</span>
<a name="l00269"></a>00269                     {
<a name="l00270"></a>00270                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;Registros não encontrados!&quot;</span>;
<a name="l00271"></a>00271                     }
<a name="l00272"></a>00272                 <span class="keywordflow">if</span> (fj10)
<a name="l00273"></a>00273                     {
<a name="l00274"></a>00274                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;1\tFUNJECC\t\t\t\t&quot;</span>;
<a name="l00275"></a>00275                     <span class="comment">//cout &lt;&lt; imp &lt;&lt; endl;</span>
<a name="l00276"></a>00276                     aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00277"></a>00277                     sprintf(aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,imp[0]);
<a name="l00278"></a>00278                     <span class="comment">//cout &lt;&lt; aux &lt;&lt; endl;</span>
<a name="l00279"></a>00279                     AUX.clear();
<a name="l00280"></a>00280                     AUX = casa_milhar(aux,0);
<a name="l00281"></a>00281                     <span class="keyword">delete</span> aux;
<a name="l00282"></a>00282                     tam = AUX.length();
<a name="l00283"></a>00283                     <span class="keywordflow">if</span> (tam == 4)
<a name="l00284"></a>00284                             {
<a name="l00285"></a>00285                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00286"></a>00286                             }
<a name="l00287"></a>00287                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00288"></a>00288                             {
<a name="l00289"></a>00289                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00290"></a>00290                             }
<a name="l00291"></a>00291                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00292"></a>00292                             {
<a name="l00293"></a>00293                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00294"></a>00294                             }
<a name="l00295"></a>00295                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00296"></a>00296                             {
<a name="l00297"></a>00297                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00298"></a>00298                             }
<a name="l00299"></a>00299                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += AUX;
<a name="l00300"></a>00300                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> +=<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00301"></a>00301                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;1\tISSQN\t\t\t\t&quot;</span>;
<a name="l00302"></a>00302                     aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00303"></a>00303                     sprintf(aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,imp[1]);
<a name="l00304"></a>00304                     <span class="comment">//cout &lt;&lt; aux &lt;&lt; endl;</span>
<a name="l00305"></a>00305                     AUX.clear();
<a name="l00306"></a>00306                     AUX = casa_milhar(aux,0);
<a name="l00307"></a>00307                     <span class="keyword">delete</span> aux;
<a name="l00308"></a>00308                     tam = AUX.length();
<a name="l00309"></a>00309                     <span class="keywordflow">if</span> (tam == 4)
<a name="l00310"></a>00310                             {
<a name="l00311"></a>00311                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00312"></a>00312                             }
<a name="l00313"></a>00313                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00314"></a>00314                             {
<a name="l00315"></a>00315                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00316"></a>00316                             }
<a name="l00317"></a>00317                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00318"></a>00318                             {
<a name="l00319"></a>00319                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00320"></a>00320                             }
<a name="l00321"></a>00321                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00322"></a>00322                             {
<a name="l00323"></a>00323                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00324"></a>00324                             }
<a name="l00325"></a>00325                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += AUX;
<a name="l00326"></a>00326                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> +=<span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00327"></a>00327                     }
<a name="l00328"></a>00328                 <span class="keywordflow">for</span> (j=0; j &lt; 48; j++)
<a name="l00329"></a>00329                     {
<a name="l00330"></a>00330                     this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>+=<span class="stringliteral">&quot;_&quot;</span>;
<a name="l00331"></a>00331                     }
<a name="l00332"></a>00332                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>+=<span class="stringliteral">&quot;&lt;span size=&#39;9216&#39;&gt;\n\tTotal\t\tDesc.\t\tTot. Liq.\n&quot;</span>;
<a name="l00333"></a>00333                 aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00334"></a>00334                 sprintf(aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,tt);
<a name="l00335"></a>00335                 AUX.clear();
<a name="l00336"></a>00336                 AUX = casa_milhar(aux,0);
<a name="l00337"></a>00337                 <span class="keyword">delete</span> aux;
<a name="l00338"></a>00338                 tam = AUX.length();
<a name="l00339"></a>00339                     <span class="keywordflow">if</span> (tam == 4)
<a name="l00340"></a>00340                             {
<a name="l00341"></a>00341                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00342"></a>00342                             }
<a name="l00343"></a>00343                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00344"></a>00344                             {
<a name="l00345"></a>00345                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00346"></a>00346                             }
<a name="l00347"></a>00347                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00348"></a>00348                             {
<a name="l00349"></a>00349                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00350"></a>00350                             }
<a name="l00351"></a>00351                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00352"></a>00352                             {
<a name="l00353"></a>00353                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00354"></a>00354                             }
<a name="l00355"></a>00355                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>+AUX;
<a name="l00356"></a>00356                 aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00357"></a>00357                 sprintf (aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,desc);
<a name="l00358"></a>00358                 AUX.clear();
<a name="l00359"></a>00359                 AUX = casa_milhar(aux,0);
<a name="l00360"></a>00360                 <span class="keyword">delete</span> aux;
<a name="l00361"></a>00361                 tam = AUX.length();
<a name="l00362"></a>00362                     <span class="keywordflow">if</span> (tam == 4)
<a name="l00363"></a>00363                             {
<a name="l00364"></a>00364                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00365"></a>00365                             }
<a name="l00366"></a>00366                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00367"></a>00367                             {
<a name="l00368"></a>00368                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00369"></a>00369                             }
<a name="l00370"></a>00370                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00371"></a>00371                             {
<a name="l00372"></a>00372                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00373"></a>00373                             }
<a name="l00374"></a>00374                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00375"></a>00375                             {
<a name="l00376"></a>00376                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00377"></a>00377                             }
<a name="l00378"></a>00378                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>+AUX;
<a name="l00379"></a>00379                 aux = <span class="keyword">new</span> <span class="keywordtype">char</span>[32];
<a name="l00380"></a>00380                 sprintf (aux,<span class="stringliteral">&quot;%0.2f&quot;</span>,tt_liq);
<a name="l00381"></a>00381                 AUX.clear();
<a name="l00382"></a>00382                 AUX = casa_milhar(aux,0);
<a name="l00383"></a>00383                 <span class="keyword">delete</span> aux;
<a name="l00384"></a>00384                 tam = AUX.length();
<a name="l00385"></a>00385                     <span class="keywordflow">if</span> (tam == 4)
<a name="l00386"></a>00386                             {
<a name="l00387"></a>00387                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00388"></a>00388                             }
<a name="l00389"></a>00389                         <span class="keywordflow">if</span> (tam &lt;= 5)
<a name="l00390"></a>00390                             {
<a name="l00391"></a>00391                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;    &quot;</span>;
<a name="l00392"></a>00392                             }
<a name="l00393"></a>00393                         <span class="keywordflow">if</span> (tam &lt;= 6)
<a name="l00394"></a>00394                             {
<a name="l00395"></a>00395                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot; &quot;</span>;
<a name="l00396"></a>00396                             }
<a name="l00397"></a>00397                         <span class="keywordflow">if</span> (tam &lt;= 7)
<a name="l00398"></a>00398                             {
<a name="l00399"></a>00399                             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;  &quot;</span>;
<a name="l00400"></a>00400                             }
<a name="l00401"></a>00401                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;\t&quot;</span>+AUX;
<a name="l00402"></a>00402                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;/span&gt;\n&quot;</span>;
<a name="l00403"></a>00403                 this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> += <span class="stringliteral">&quot;&lt;span size=&#39;7128&#39;&gt;&quot;</span>+func+<span class="stringliteral">&quot;&lt;/span&gt;\n&quot;</span>;
<a name="l00404"></a>00404                 }
<a name="l00405"></a>00405             }
<a name="l00406"></a>00406         <span class="keywordflow">else</span>
<a name="l00407"></a>00407             {
<a name="l00408"></a>00408             this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a> = <span class="stringliteral">&quot;Recibo não encontrado!&quot;</span>;
<a name="l00409"></a>00409             }
<a name="l00410"></a>00410         }
<a name="l00411"></a>00411     <span class="keyword">delete</span> banco;
<a name="l00412"></a>00412     }
<a name="l00413"></a><a class="code" href="classPrintFormOperation.html#ae595c6b385dc225e237d439b5da5141f">00413</a> <span class="keywordtype">void</span> <a class="code" href="classPrintFormOperation.html#ae595c6b385dc225e237d439b5da5141f">PrintFormOperation::set_rodape</a>() 
<a name="l00414"></a>00414     { 
<a name="l00415"></a>00415     Glib::ustring Texto, AUX;
<a name="l00416"></a>00416     <span class="keywordtype">int</span> deslocar, i;
<a name="l00417"></a>00417 
<a name="l00418"></a>00418     this-&gt;<a class="code" href="classPrintFormOperation.html#a92744cdaa012ce0060f49f0b89110a4f">m_rodape</a>.clear();
<a name="l00419"></a>00419     <span class="keywordflow">for</span> (i=0; i &lt; 48; i++)
<a name="l00420"></a>00420         {
<a name="l00421"></a>00421         this-&gt;<a class="code" href="classPrintFormOperation.html#a92744cdaa012ce0060f49f0b89110a4f">m_rodape</a> += <span class="stringliteral">&quot;_&quot;</span>;
<a name="l00422"></a>00422         }
<a name="l00423"></a>00423     Texto.clear();
<a name="l00424"></a>00424     Texto = <span class="stringliteral">&quot;       TESTAMENTOS - ESCRITURAS - PROCURAÇÕES\n                FIRMAS - AUTENTICAÇÕES - PROTESTO&quot;</span>;
<a name="l00425"></a>00425     this-&gt;<a class="code" href="classPrintFormOperation.html#a92744cdaa012ce0060f49f0b89110a4f">m_rodape</a> += <span class="stringliteral">&quot;\n&lt;span size=&#39;7680&#39;&gt;&quot;</span>+Texto+<span class="stringliteral">&quot;&lt;/span&gt;\n\n\n&quot;</span>;
<a name="l00426"></a>00426     }
<a name="l00427"></a>00427 
<a name="l00428"></a><a class="code" href="classPrintFormOperation.html#af738576754fb8adb43c66131ba2dc616">00428</a> <span class="keywordtype">void</span> <a class="code" href="classPrintFormOperation.html#af738576754fb8adb43c66131ba2dc616">PrintFormOperation::on_begin_print</a>(<span class="keyword">const</span> Glib::RefPtr&lt;Gtk::PrintContext&gt;&amp; print_context)
<a name="l00429"></a>00429     {
<a name="l00430"></a>00430     <span class="comment">//Create and set up a Pango layout for PrintData based on the passed</span>
<a name="l00431"></a>00431     <span class="comment">//PrintContext: We then use this to calculate the number of pages needed, and</span>
<a name="l00432"></a>00432     <span class="comment">//the lines that are on each page.</span>
<a name="l00433"></a>00433     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a> = print_context-&gt;create_pango_layout();
<a name="l00434"></a>00434     
<a name="l00435"></a>00435     Pango::FontDescription font_desc(<span class="stringliteral">&quot;Arial 8&quot;</span>);
<a name="l00436"></a>00436     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;set_font_description(font_desc);
<a name="l00437"></a>00437 
<a name="l00438"></a>00438     <span class="keyword">const</span> <span class="keywordtype">double</span> width = print_context-&gt;get_width();
<a name="l00439"></a>00439     this-&gt;<a class="code" href="classPrintFormOperation.html#a410cc0dc9b4deb57f8974852adbe2f52">largura</a> = width;
<a name="l00440"></a>00440     <span class="keyword">const</span> <span class="keywordtype">double</span> height = print_context-&gt;get_height();
<a name="l00441"></a>00441     this-&gt;<a class="code" href="classPrintFormOperation.html#aca1cdcaa0ba841fbdb3ea9059c51c008">altura</a> = height;
<a name="l00442"></a>00442 
<a name="l00443"></a>00443     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;set_width(static_cast&lt;int&gt;(width * Pango::SCALE));
<a name="l00444"></a>00444     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;set_alignment(Pango::ALIGN_LEFT);
<a name="l00445"></a>00445     this-&gt;<a class="code" href="classPrintFormOperation.html#ab690e926a88fe66c5e3032123d306c32">set_cabecalho</a>();
<a name="l00446"></a>00446     this-&gt;<a class="code" href="classPrintFormOperation.html#ae595c6b385dc225e237d439b5da5141f">set_rodape</a>();
<a name="l00447"></a>00447     <span class="comment">//cout &lt;&lt; this-&gt;m_cabecalho+this-&gt;m_corpo+this-&gt;m_rodape &lt;&lt; endl;</span>
<a name="l00448"></a>00448     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;set_markup(this-&gt;<a class="code" href="classPrintFormOperation.html#aceccab7b6f31b1b476e57b75f5690248">m_cabecalho</a>+this-&gt;<a class="code" href="classPrintFormOperation.html#a3db866f04b824f0e4a23921369ecd75a">m_corpo</a>+this-&gt;<a class="code" href="classPrintFormOperation.html#a92744cdaa012ce0060f49f0b89110a4f">m_rodape</a>);
<a name="l00449"></a>00449     
<a name="l00450"></a>00450     <span class="comment">//Set the number of pages to print by determining the line numbers</span>
<a name="l00451"></a>00451     <span class="comment">//where page breaks occur:</span>
<a name="l00452"></a>00452     <span class="keyword">const</span> <span class="keywordtype">int</span> line_count = <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;get_line_count();
<a name="l00453"></a>00453 
<a name="l00454"></a>00454     Glib::RefPtr&lt;Pango::LayoutLine&gt; layout_line;
<a name="l00455"></a>00455     <span class="keywordtype">double</span> page_height = 0;
<a name="l00456"></a>00456 
<a name="l00457"></a>00457     <span class="keywordflow">for</span> (<span class="keywordtype">int</span> line = 0; line &lt; line_count; ++line)
<a name="l00458"></a>00458         {
<a name="l00459"></a>00459         Pango::Rectangle ink_rect, logical_rect;
<a name="l00460"></a>00460 
<a name="l00461"></a>00461         layout_line = <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;get_line(line);
<a name="l00462"></a>00462         layout_line-&gt;get_extents(ink_rect, logical_rect);
<a name="l00463"></a>00463 
<a name="l00464"></a>00464         <span class="keyword">const</span> <span class="keywordtype">double</span> line_height = logical_rect.get_height() / 1024.0;
<a name="l00465"></a>00465 
<a name="l00466"></a>00466         <span class="keywordflow">if</span> (page_height + line_height &gt; height)
<a name="l00467"></a>00467             {
<a name="l00468"></a>00468             <a class="code" href="classPrintFormOperation.html#abdbd37ed269c54708f240a675afe7336">QuebraPagina</a>.push_back(line);
<a name="l00469"></a>00469             page_height = 0;
<a name="l00470"></a>00470             }
<a name="l00471"></a>00471 
<a name="l00472"></a>00472         page_height += line_height;
<a name="l00473"></a>00473         }
<a name="l00474"></a>00474 
<a name="l00475"></a>00475     set_n_pages(<a class="code" href="classPrintFormOperation.html#abdbd37ed269c54708f240a675afe7336">QuebraPagina</a>.size() + 1);
<a name="l00476"></a>00476 
<a name="l00477"></a>00477     }
<a name="l00478"></a>00478 
<a name="l00479"></a><a class="code" href="classPrintFormOperation.html#a2241eb16314623ab3ab1f10b6d41c2dd">00479</a> <span class="keywordtype">void</span> <a class="code" href="classPrintFormOperation.html#a2241eb16314623ab3ab1f10b6d41c2dd">PrintFormOperation::on_draw_page</a>(<span class="keyword">const</span> Glib::RefPtr&lt;Gtk::PrintContext&gt;&amp; print_context, <span class="keywordtype">int</span> page_nr)
<a name="l00480"></a>00480     {
<a name="l00481"></a>00481     <span class="comment">//Decide which lines we need to print in order to print the specified page:</span>
<a name="l00482"></a>00482     <span class="keywordtype">int</span> start_page_line = 0;
<a name="l00483"></a>00483     <span class="keywordtype">int</span> end_page_line = 0;
<a name="l00484"></a>00484 
<a name="l00485"></a>00485     <span class="keywordflow">if</span>(page_nr == 0)
<a name="l00486"></a>00486         {
<a name="l00487"></a>00487         start_page_line = 0;
<a name="l00488"></a>00488         }
<a name="l00489"></a>00489     <span class="keywordflow">else</span>
<a name="l00490"></a>00490         {
<a name="l00491"></a>00491         start_page_line = <a class="code" href="classPrintFormOperation.html#abdbd37ed269c54708f240a675afe7336">QuebraPagina</a>[page_nr - 1];
<a name="l00492"></a>00492         }
<a name="l00493"></a>00493 
<a name="l00494"></a>00494     <span class="keywordflow">if</span>(page_nr &lt; static_cast&lt;int&gt;(<a class="code" href="classPrintFormOperation.html#abdbd37ed269c54708f240a675afe7336">QuebraPagina</a>.size()))
<a name="l00495"></a>00495         {
<a name="l00496"></a>00496         end_page_line = <a class="code" href="classPrintFormOperation.html#abdbd37ed269c54708f240a675afe7336">QuebraPagina</a>[page_nr];
<a name="l00497"></a>00497         }
<a name="l00498"></a>00498     <span class="keywordflow">else</span>
<a name="l00499"></a>00499         {
<a name="l00500"></a>00500         end_page_line = <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;get_line_count();
<a name="l00501"></a>00501         }
<a name="l00502"></a>00502 
<a name="l00503"></a>00503     <span class="comment">//Get a Cairo Context, which is used as a drawing board:</span>
<a name="l00504"></a>00504     Cairo::RefPtr&lt;Cairo::Context&gt; cairo_ctx = print_context-&gt;get_cairo_context();
<a name="l00505"></a>00505 
<a name="l00506"></a>00506     <span class="comment">//We&#39;ll use black letters:</span>
<a name="l00507"></a>00507     cairo_ctx-&gt;set_source_rgb(0, 0, 0);
<a name="l00508"></a>00508 
<a name="l00509"></a>00509     <span class="comment">//Render Pango LayoutLines over the Cairo context:</span>
<a name="l00510"></a>00510     Pango::LayoutIter iter;
<a name="l00511"></a>00511     <a class="code" href="classPrintFormOperation.html#a2b7d8b2df55fdecfde64550d28017558">Formulario</a>-&gt;get_iter(iter);
<a name="l00512"></a>00512 
<a name="l00513"></a>00513     <span class="keywordtype">double</span> start_pos = 0;
<a name="l00514"></a>00514     <span class="keywordtype">int</span> line_index = 0;
<a name="l00515"></a>00515 
<a name="l00516"></a>00516     <span class="keywordflow">do</span>
<a name="l00517"></a>00517         {
<a name="l00518"></a>00518         <span class="keywordflow">if</span> (line_index &gt;= start_page_line)
<a name="l00519"></a>00519             {
<a name="l00520"></a>00520             Glib::RefPtr&lt;Pango::LayoutLine&gt; layout_line = iter.get_line();
<a name="l00521"></a>00521             Pango::Rectangle logical_rect = iter.get_line_logical_extents();
<a name="l00522"></a>00522             <span class="keywordtype">int</span> baseline = iter.get_baseline();
<a name="l00523"></a>00523 
<a name="l00524"></a>00524             <span class="keywordflow">if</span> (line_index == start_page_line)
<a name="l00525"></a>00525                 {
<a name="l00526"></a>00526                 start_pos = logical_rect.get_y() / 1024.0;
<a name="l00527"></a>00527                 }
<a name="l00528"></a>00528 
<a name="l00529"></a>00529             cairo_ctx-&gt;move_to(logical_rect.get_x() / 1024.0, baseline / 1024.0 - start_pos);
<a name="l00530"></a>00530 
<a name="l00531"></a>00531             layout_line-&gt;show_in_cairo_context(cairo_ctx);
<a name="l00532"></a>00532             }
<a name="l00533"></a>00533 
<a name="l00534"></a>00534         line_index++;
<a name="l00535"></a>00535         }<span class="keywordflow">while</span> (line_index &lt; end_page_line &amp;&amp; iter.next_line());
<a name="l00536"></a>00536     }
<a name="l00537"></a>00537 
<a name="l00538"></a><a class="code" href="classIMPRIMIR.html#aaae4ca7b93cf23a2643c4e9e6c936b7a">00538</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#aaae4ca7b93cf23a2643c4e9e6c936b7a">IMPRIMIR::on_printoperation_status_changed</a>(<span class="keyword">const</span> Glib::RefPtr&lt;PrintFormOperation&gt;&amp; operation)
<a name="l00539"></a>00539     {
<a name="l00540"></a>00540     Glib::ustring status_msg;
<a name="l00541"></a>00541 
<a name="l00542"></a>00542     <span class="keywordflow">if</span> (operation-&gt;is_finished())
<a name="l00543"></a>00543         {
<a name="l00544"></a>00544         status_msg = <span class="stringliteral">&quot;Print job completed.&quot;</span>;
<a name="l00545"></a>00545         }
<a name="l00546"></a>00546     <span class="keywordflow">else</span>
<a name="l00547"></a>00547         {
<a name="l00548"></a>00548         <span class="comment">//You could also use get_status().</span>
<a name="l00549"></a>00549         status_msg = operation-&gt;get_status_string();
<a name="l00550"></a>00550         }   
<a name="l00551"></a>00551     }
<a name="l00552"></a>00552 
<a name="l00553"></a><a class="code" href="classIMPRIMIR.html#ae89b8bf5f628a046eff4b3be5e3fa1fb">00553</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#ae89b8bf5f628a046eff4b3be5e3fa1fb">IMPRIMIR::on_printoperation_done</a>(Gtk::PrintOperationResult result,<span class="keyword">const</span> Glib::RefPtr&lt;PrintFormOperation&gt;&amp; operation)
<a name="l00554"></a>00554     {
<a name="l00555"></a>00555     <span class="comment">//Printing is &quot;done&quot; when the print data is spooled.</span>
<a name="l00556"></a>00556 
<a name="l00557"></a>00557     <span class="keywordflow">if</span> (result == Gtk::PRINT_OPERATION_RESULT_ERROR)
<a name="l00558"></a>00558         {
<a name="l00559"></a>00559         Gtk::MessageDialog err_dialog(*<span class="keyword">this</span>, <span class="stringliteral">&quot;Error printing form&quot;</span>, <span class="keyword">false</span>,Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, <span class="keyword">true</span>);
<a name="l00560"></a>00560         err_dialog.run();
<a name="l00561"></a>00561         }
<a name="l00562"></a>00562     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (result == Gtk::PRINT_OPERATION_RESULT_APPLY)
<a name="l00563"></a>00563         {
<a name="l00564"></a>00564         <span class="comment">//Update PrintSettings with the ones used in this PrintOperation:</span>
<a name="l00565"></a>00565         <a class="code" href="classIMPRIMIR.html#a31101a4ff6b033837fd9737139f44fa6">ConfImpress</a> = operation-&gt;get_print_settings();
<a name="l00566"></a>00566         }
<a name="l00567"></a>00567 
<a name="l00568"></a>00568     <span class="keywordflow">if</span> (! operation-&gt;is_finished())
<a name="l00569"></a>00569         {
<a name="l00570"></a>00570         <span class="comment">//We will connect to the status-changed signal to track status</span>
<a name="l00571"></a>00571         <span class="comment">//and update a status bar. In addition, you can, for example,</span>
<a name="l00572"></a>00572         <span class="comment">//keep a list of active print operations, or provide a progress dialog.</span>
<a name="l00573"></a>00573         operation-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#aaae4ca7b93cf23a2643c4e9e6c936b7a">IMPRIMIR::on_printoperation_status_changed</a>),operation));
<a name="l00574"></a>00574         }
<a name="l00575"></a>00575     }
<a name="l00576"></a>00576 
<a name="l00577"></a><a class="code" href="classIMPRIMIR.html#ae69f4b5315d5356e411475b1843a4ee6">00577</a> <a class="code" href="classIMPRIMIR.html#ae69f4b5315d5356e411475b1843a4ee6">IMPRIMIR::IMPRIMIR</a>(<span class="keywordtype">int</span> tipo, <span class="keywordtype">string</span> data, <span class="keywordtype">int</span> recibo)
<a name="l00578"></a>00578     {
<a name="l00579"></a>00579     this-&gt;<a class="code" href="classIMPRIMIR.html#a2a94e965a20ae63352aa2a33407b7135">conexao</a> = <span class="keyword">new</span> BANCO(CONF_FILE);  
<a name="l00580"></a>00580     this-&gt;tipo = tipo;
<a name="l00581"></a>00581     this-&gt;data = data;
<a name="l00582"></a>00582     this-&gt;recibo = recibo;
<a name="l00583"></a>00583     <span class="comment">//cout &lt;&lt; this-&gt;tipo &lt;&lt; endl;</span>
<a name="l00584"></a>00584     <span class="comment">//cout &lt;&lt; this-&gt;data &lt;&lt; endl;</span>
<a name="l00585"></a>00585     <span class="comment">//cout &lt;&lt; this-&gt;recibo &lt;&lt; endl;</span>
<a name="l00586"></a>00586     <span class="keyword">const</span> Gtk::PaperSize papel(<span class="stringliteral">&quot;Recibo-Paper&quot;</span>,<span class="stringliteral">&quot;Recibo-Paper&quot;</span>,77,170,Gtk::UNIT_MM);
<a name="l00587"></a>00587     <a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a> = Gtk::PageSetup::create();
<a name="l00588"></a>00588     <a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a>-&gt;set_paper_size (papel);
<a name="l00589"></a>00589     <a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a>-&gt;set_right_margin(0,Gtk::UNIT_MM);
<a name="l00590"></a>00590     <a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a>-&gt;set_left_margin(7,Gtk::UNIT_MM);
<a name="l00591"></a>00591     <a class="code" href="classIMPRIMIR.html#a31101a4ff6b033837fd9737139f44fa6">ConfImpress</a> = Gtk::PrintSettings::create();
<a name="l00592"></a>00592     set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG);
<a name="l00593"></a>00593     set_position(Gtk::WIN_POS_CENTER);
<a name="l00594"></a>00594     set_title(Glib::ustring(<span class="stringliteral">&quot;Visualização do Recibo&quot;</span>));
<a name="l00595"></a>00595     set_size_request(300,600);
<a name="l00596"></a>00596     <a class="code" href="classIMPRIMIR.html#a2e15ec147911ac8aa4282ef2470660d0">Box_Principal</a>.set_homogeneous(<span class="keyword">false</span>); 
<a name="l00597"></a>00597     <a class="code" href="classIMPRIMIR.html#a2e15ec147911ac8aa4282ef2470660d0">Box_Principal</a>.set_spacing(0);
<a name="l00598"></a>00598 
<a name="l00599"></a>00599     <a class="code" href="classIMPRIMIR.html#ac3c5a6fccf3272d90e74e3ffecb1a9b6">Box_Menu</a>.set_homogeneous(<span class="keyword">false</span>);
<a name="l00600"></a>00600     <a class="code" href="classIMPRIMIR.html#ac3c5a6fccf3272d90e74e3ffecb1a9b6">Box_Menu</a>.set_spacing(0);
<a name="l00601"></a>00601 
<a name="l00602"></a>00602     <a class="code" href="classIMPRIMIR.html#ae5b425b1b82149742da73eacc2158631">b_setup</a>.signal_clicked().connect(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#af456260ab148611694c84d0333504930">IMPRIMIR::Imprimir_Config</a>));
<a name="l00603"></a>00603     <a class="code" href="classIMPRIMIR.html#ae5b425b1b82149742da73eacc2158631">b_setup</a>.set_stock_id(Gtk::Stock::PROPERTIES);
<a name="l00604"></a>00604     <a class="code" href="classIMPRIMIR.html#ae5b425b1b82149742da73eacc2158631">b_setup</a>.set_label(<span class="stringliteral">&quot;Configurar&quot;</span>);
<a name="l00605"></a>00605     <a class="code" href="classIMPRIMIR.html#a6c83d5a223121265b60dbe824692fb4f">b_preview</a>.set_stock_id(Gtk::Stock::PRINT_PREVIEW);
<a name="l00606"></a>00606     <a class="code" href="classIMPRIMIR.html#a6c83d5a223121265b60dbe824692fb4f">b_preview</a>.set_label(<span class="stringliteral">&quot;Visualizar&quot;</span>);
<a name="l00607"></a>00607     <a class="code" href="classIMPRIMIR.html#a6c83d5a223121265b60dbe824692fb4f">b_preview</a>.signal_clicked().connect(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#a06f3d2bdd802ab01003d8eaeaaa1c9fa">IMPRIMIR::Imprimir_Preview</a>));
<a name="l00608"></a>00608     <a class="code" href="classIMPRIMIR.html#a87946493bf5c99f645cfddb66b43433a">b_imprimir</a>.set_stock_id(Gtk::Stock::PRINT);
<a name="l00609"></a>00609     <a class="code" href="classIMPRIMIR.html#a87946493bf5c99f645cfddb66b43433a">b_imprimir</a>.set_label(<span class="stringliteral">&quot;Imprimir&quot;</span>);
<a name="l00610"></a>00610     <a class="code" href="classIMPRIMIR.html#a87946493bf5c99f645cfddb66b43433a">b_imprimir</a>.signal_clicked().connect(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#a7f01d704be0a85cada7d5bd5fbdceaa9">IMPRIMIR::Imprimir</a>));
<a name="l00611"></a>00611     <a class="code" href="classIMPRIMIR.html#a8d2de57547ed76cdfbcfeea01998eaee">b_fechar</a>.set_stock_id(Gtk::Stock::CLOSE);
<a name="l00612"></a>00612     <a class="code" href="classIMPRIMIR.html#a8d2de57547ed76cdfbcfeea01998eaee">b_fechar</a>.set_label(<span class="stringliteral">&quot;Fechar&quot;</span>);
<a name="l00613"></a>00613     <a class="code" href="classIMPRIMIR.html#a8d2de57547ed76cdfbcfeea01998eaee">b_fechar</a>.signal_clicked().connect(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#a7355c118d9b3f7132cf9bb1c20a14f9d">IMPRIMIR::fechar</a>));
<a name="l00614"></a>00614 
<a name="l00615"></a>00615     <a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>.append(<a class="code" href="classIMPRIMIR.html#ae5b425b1b82149742da73eacc2158631">b_setup</a>);
<a name="l00616"></a>00616     <a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>.append(<a class="code" href="classIMPRIMIR.html#a6c83d5a223121265b60dbe824692fb4f">b_preview</a>);
<a name="l00617"></a>00617     <a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>.append(<a class="code" href="classIMPRIMIR.html#a87946493bf5c99f645cfddb66b43433a">b_imprimir</a>);
<a name="l00618"></a>00618     <a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>.append(<a class="code" href="classIMPRIMIR.html#a8941c7b89121047bb19691970d2b6007">b_separador</a>);
<a name="l00619"></a>00619     <a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>.append(<a class="code" href="classIMPRIMIR.html#a8d2de57547ed76cdfbcfeea01998eaee">b_fechar</a>);
<a name="l00620"></a>00620     
<a name="l00621"></a>00621     <a class="code" href="classIMPRIMIR.html#ac3c5a6fccf3272d90e74e3ffecb1a9b6">Box_Menu</a>.pack_start(<a class="code" href="classIMPRIMIR.html#a0aec7303d31db3b8872e6f43f65d0456">tb_imprimir</a>,<span class="keyword">false</span>,<span class="keyword">true</span>,0);
<a name="l00622"></a>00622     <a class="code" href="classIMPRIMIR.html#ac9032aa0394b88ea0a7bee150caeec33">Box_Conteudo</a>.set_homogeneous(<span class="keyword">false</span>);
<a name="l00623"></a>00623     <a class="code" href="classIMPRIMIR.html#ac9032aa0394b88ea0a7bee150caeec33">Box_Conteudo</a>.set_spacing(0);
<a name="l00624"></a>00624 
<a name="l00625"></a>00625     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a> = <a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>.get_buffer();
<a name="l00626"></a>00626     <a class="code" href="classIMPRIMIR.html#acd7683bf3ff7ecab1f2a59792a292b2e">tags_create</a>();
<a name="l00627"></a>00627     <a class="code" href="classIMPRIMIR.html#ac32c7b1601ffcc8f75b1ce380ee3e673">gerar_texto</a>();
<a name="l00628"></a>00628     <a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>.set_justification(Gtk::JUSTIFY_FILL);
<a name="l00629"></a>00629     <a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>.set_buffer(<a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>);
<a name="l00630"></a>00630     <a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>.set_editable(<span class="keyword">false</span>);
<a name="l00631"></a>00631     <a class="code" href="classIMPRIMIR.html#afd257da6911d79d6b88a5877a8a8fb7e">SVisualiza</a>.add(<a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>);
<a name="l00632"></a>00632     <a class="code" href="classIMPRIMIR.html#afd257da6911d79d6b88a5877a8a8fb7e">SVisualiza</a>.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
<a name="l00633"></a>00633 
<a name="l00634"></a>00634     <a class="code" href="classIMPRIMIR.html#ac9032aa0394b88ea0a7bee150caeec33">Box_Conteudo</a>.pack_start(<a class="code" href="classIMPRIMIR.html#afd257da6911d79d6b88a5877a8a8fb7e">SVisualiza</a>,<span class="keyword">true</span>,<span class="keyword">true</span>,0);
<a name="l00635"></a>00635             
<a name="l00636"></a>00636     <a class="code" href="classIMPRIMIR.html#a2e15ec147911ac8aa4282ef2470660d0">Box_Principal</a>.pack_start(<a class="code" href="classIMPRIMIR.html#ac3c5a6fccf3272d90e74e3ffecb1a9b6">Box_Menu</a>,<span class="keyword">false</span>,<span class="keyword">true</span>,0);
<a name="l00637"></a>00637     <a class="code" href="classIMPRIMIR.html#a2e15ec147911ac8aa4282ef2470660d0">Box_Principal</a>.pack_start(<a class="code" href="classIMPRIMIR.html#ac9032aa0394b88ea0a7bee150caeec33">Box_Conteudo</a>,<span class="keyword">true</span>,<span class="keyword">true</span>,0);
<a name="l00638"></a>00638             
<a name="l00639"></a>00639     add(<a class="code" href="classIMPRIMIR.html#a2e15ec147911ac8aa4282ef2470660d0">Box_Principal</a>);
<a name="l00640"></a>00640     show_all();
<a name="l00641"></a>00641     }
<a name="l00642"></a>00642 
<a name="l00643"></a><a class="code" href="classIMPRIMIR.html#a1b1cfd5d9361a73a879a9b705533a768">00643</a> <a class="code" href="classIMPRIMIR.html#a1b1cfd5d9361a73a879a9b705533a768">IMPRIMIR::~IMPRIMIR</a>()
<a name="l00644"></a>00644     {
<a name="l00645"></a>00645     <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classIMPRIMIR.html#a2a94e965a20ae63352aa2a33407b7135">conexao</a>-&gt;conectado)
<a name="l00646"></a>00646         {
<a name="l00647"></a>00647         <span class="keyword">delete</span> this-&gt;<a class="code" href="classIMPRIMIR.html#a2a94e965a20ae63352aa2a33407b7135">conexao</a>;
<a name="l00648"></a>00648         }
<a name="l00649"></a>00649     <a class="code" href="classIMPRIMIR.html#a7355c118d9b3f7132cf9bb1c20a14f9d">fechar</a>();
<a name="l00650"></a>00650     }
<a name="l00651"></a><a class="code" href="classIMPRIMIR.html#a02c0954338e840dd388ac437b2e874c4">00651</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#a02c0954338e840dd388ac437b2e874c4">IMPRIMIR::print_or_preview</a>(Gtk::PrintOperationAction print_action)
<a name="l00652"></a>00652     {
<a name="l00653"></a>00653     <span class="comment">//Create a new PrintOperation with our PageSetup and PrintSettings:</span>
<a name="l00654"></a>00654     <span class="comment">//(We use our derived PrintOperation class)</span>
<a name="l00655"></a>00655     Glib::RefPtr&lt;PrintFormOperation&gt; print = <a class="code" href="classPrintFormOperation.html#a85020e0c5d4fb001a496b0dd95a9e7b4">PrintFormOperation::create</a>();
<a name="l00656"></a>00656 
<a name="l00657"></a>00657     print-&gt;set_corpo(this-&gt;<a class="code" href="classIMPRIMIR.html#a464f6534bb3a2491525bf05f1df78728">tipo</a>,this-&gt;<a class="code" href="classIMPRIMIR.html#ae33dc329b01826296aaa1fc6394a5e46">data</a>,this-&gt;<a class="code" href="classIMPRIMIR.html#ad16d9fcf0627414eed28b81fa835d8e1">recibo</a>);
<a name="l00658"></a>00658 
<a name="l00659"></a>00659     print-&gt;set_track_print_status();
<a name="l00660"></a>00660     print-&gt;set_default_page_setup(<a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a>);
<a name="l00661"></a>00661     print-&gt;set_print_settings(<a class="code" href="classIMPRIMIR.html#a31101a4ff6b033837fd9737139f44fa6">ConfImpress</a>);
<a name="l00662"></a>00662 
<a name="l00663"></a>00663     print-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(*<span class="keyword">this</span>,&amp;<a class="code" href="classIMPRIMIR.html#ae89b8bf5f628a046eff4b3be5e3fa1fb">IMPRIMIR::on_printoperation_done</a>), print));
<a name="l00664"></a>00664     <span class="keywordflow">try</span>
<a name="l00665"></a>00665         {
<a name="l00666"></a>00666         print-&gt;run(print_action <span class="comment">/* print or preview */</span>, *<span class="keyword">this</span>);
<a name="l00667"></a>00667         }
<a name="l00668"></a>00668     <span class="keywordflow">catch</span> (<span class="keyword">const</span> Gtk::PrintError&amp; ex)
<a name="l00669"></a>00669         {
<a name="l00670"></a>00670         <span class="comment">//See documentation for exact Gtk::PrintError error codes.</span>
<a name="l00671"></a>00671         std::cerr &lt;&lt; <span class="stringliteral">&quot;An error occurred while trying to run a print operation:&quot;</span> &lt;&lt; ex.what() &lt;&lt; std::endl;
<a name="l00672"></a>00672         }
<a name="l00673"></a>00673     }
<a name="l00674"></a>00674 
<a name="l00675"></a><a class="code" href="classIMPRIMIR.html#abb803ffe75a47c8507591f9bbef69ca0">00675</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#abb803ffe75a47c8507591f9bbef69ca0">IMPRIMIR::on_menu_file_new</a>()
<a name="l00676"></a>00676     {
<a name="l00677"></a>00677   
<a name="l00678"></a>00678     }
<a name="l00679"></a>00679 
<a name="l00680"></a><a class="code" href="classIMPRIMIR.html#af456260ab148611694c84d0333504930">00680</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#af456260ab148611694c84d0333504930">IMPRIMIR::Imprimir_Config</a>()
<a name="l00681"></a>00681     {
<a name="l00682"></a>00682     <span class="comment">//Show the page setup dialog, asking it to start with the existing settings:</span>
<a name="l00683"></a>00683     Glib::RefPtr&lt;Gtk::PageSetup&gt; new_page_setup = Gtk::run_page_setup_dialog(*<span class="keyword">this</span>, this-&gt;<a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a>, this-&gt;<a class="code" href="classIMPRIMIR.html#a31101a4ff6b033837fd9737139f44fa6">ConfImpress</a>);
<a name="l00684"></a>00684 
<a name="l00685"></a>00685     <span class="comment">//Save the chosen page setup dialog for use when printing, previewing, or</span>
<a name="l00686"></a>00686     <span class="comment">//showing the page setup dialog again:</span>
<a name="l00687"></a>00687     this-&gt;<a class="code" href="classIMPRIMIR.html#a622a73e75e19dcd561ae3f694ed3425e">SetupPagina</a> = new_page_setup;
<a name="l00688"></a>00688     }
<a name="l00689"></a>00689 
<a name="l00690"></a><a class="code" href="classIMPRIMIR.html#a06f3d2bdd802ab01003d8eaeaaa1c9fa">00690</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#a06f3d2bdd802ab01003d8eaeaaa1c9fa">IMPRIMIR::Imprimir_Preview</a>()
<a name="l00691"></a>00691     {
<a name="l00692"></a>00692     <a class="code" href="classIMPRIMIR.html#a02c0954338e840dd388ac437b2e874c4">print_or_preview</a>(Gtk::PRINT_OPERATION_ACTION_PREVIEW);
<a name="l00693"></a>00693     }
<a name="l00694"></a>00694 
<a name="l00695"></a><a class="code" href="classIMPRIMIR.html#a7f01d704be0a85cada7d5bd5fbdceaa9">00695</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#a7f01d704be0a85cada7d5bd5fbdceaa9">IMPRIMIR::Imprimir</a>()
<a name="l00696"></a>00696     {
<a name="l00697"></a>00697     <a class="code" href="classIMPRIMIR.html#a02c0954338e840dd388ac437b2e874c4">print_or_preview</a>(Gtk::PRINT_OPERATION_ACTION_PRINT_DIALOG);
<a name="l00698"></a>00698     }
<a name="l00699"></a>00699 
<a name="l00700"></a><a class="code" href="classIMPRIMIR.html#a7355c118d9b3f7132cf9bb1c20a14f9d">00700</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#a7355c118d9b3f7132cf9bb1c20a14f9d">IMPRIMIR::fechar</a>()
<a name="l00701"></a>00701     {
<a name="l00702"></a>00702     hide();
<a name="l00703"></a>00703     }
<a name="l00704"></a>00704 
<a name="l00705"></a><a class="code" href="classIMPRIMIR.html#ac3446784c943bbff8e65a283b3f6548a">00705</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#ac3446784c943bbff8e65a283b3f6548a">IMPRIMIR::corpo</a>(<span class="keyword">const</span> Glib::ustring&amp; texto)
<a name="l00706"></a>00706     {
<a name="l00707"></a>00707     <span class="comment">//this-&gt;corpo_text = texto;</span>
<a name="l00708"></a>00708     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a> = <a class="code" href="classIMPRIMIR.html#ab6de05f92f77d5b07a29c452fd2d6131">TVisualiza</a>.get_buffer();
<a name="l00709"></a>00709     this-&gt;<a class="code" href="classIMPRIMIR.html#acb57eb26e29930e38317035e4851d3e8">corpo_text</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;get_text();
<a name="l00710"></a>00710     }
<a name="l00711"></a>00711 
<a name="l00712"></a><a class="code" href="classIMPRIMIR.html#acd7683bf3ff7ecab1f2a59792a292b2e">00712</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#acd7683bf3ff7ecab1f2a59792a292b2e">IMPRIMIR::tags_create</a>()
<a name="l00713"></a>00713     {
<a name="l00714"></a>00714     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;geral&quot;</span>);
<a name="l00715"></a>00715     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_font() = <span class="stringliteral">&quot;Arial 10&quot;</span>;
<a name="l00716"></a>00716     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_wrap_mode () = Gtk::WRAP_WORD;
<a name="l00717"></a>00717     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_left_margin() = 20;
<a name="l00718"></a>00718     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_right_margin() = 20;
<a name="l00719"></a>00719     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag (<span class="stringliteral">&quot;font8&quot;</span>);
<a name="l00720"></a>00720     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_font() = <span class="stringliteral">&quot;Arial 8&quot;</span>;
<a name="l00721"></a>00721     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_wrap_mode() = Gtk::WRAP_WORD;
<a name="l00722"></a>00722     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;cabecalho_l&quot;</span>);
<a name="l00723"></a>00723     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_font() = <span class="stringliteral">&quot;Arial 14&quot;</span>;
<a name="l00724"></a>00724     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_wrap_mode() = Gtk::WRAP_WORD;
<a name="l00725"></a>00725     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_justification() = Gtk::JUSTIFY_LEFT;
<a name="l00726"></a>00726     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;cabecalho_r&quot;</span>);
<a name="l00727"></a>00727     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_font() = <span class="stringliteral">&quot;Arial 14&quot;</span>;
<a name="l00728"></a>00728     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_wrap_mode() = Gtk::WRAP_WORD;
<a name="l00729"></a>00729     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_justification() = Gtk::JUSTIFY_RIGHT;
<a name="l00730"></a>00730     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;centralizar&quot;</span>);
<a name="l00731"></a>00731     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_justification() = Gtk::JUSTIFY_CENTER;
<a name="l00732"></a>00732     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;sublinhado&quot;</span>);
<a name="l00733"></a>00733     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_underline() = Pango::UNDERLINE_SINGLE;
<a name="l00734"></a>00734     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;create_tag(<span class="stringliteral">&quot;negrito&quot;</span>);
<a name="l00735"></a>00735     <a class="code" href="classIMPRIMIR.html#aa640beb515d7aef708f5504e91712457">tags</a>-&gt;property_weight() = Pango::WEIGHT_BOLD;
<a name="l00736"></a>00736     }
<a name="l00737"></a>00737 
<a name="l00738"></a><a class="code" href="classIMPRIMIR.html#ac32c7b1601ffcc8f75b1ce380ee3e673">00738</a> <span class="keywordtype">void</span> <a class="code" href="classIMPRIMIR.html#ac32c7b1601ffcc8f75b1ce380ee3e673">IMPRIMIR::gerar_texto</a>()
<a name="l00739"></a>00739     {
<a name="l00740"></a>00740     <span class="keywordtype">int</span> tam,i;
<a name="l00741"></a>00741     <span class="keywordtype">char</span> *sql, *buf;
<a name="l00742"></a>00742     <span class="keywordtype">string</span> buffer, SQL;
<a name="l00743"></a>00743     Glib::ustring BUFFER;
<a name="l00744"></a>00744     vector&lt;string&gt; nomes_tags;
<a name="l00745"></a>00745 
<a name="l00746"></a>00746     <span class="comment">// Cabeçalho - Begin</span>
<a name="l00747"></a>00747     <a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;get_iter_at_offset(0);
<a name="l00748"></a>00748     nomes_tags.clear();
<a name="l00749"></a>00749     nomes_tags.push_back(<span class="stringliteral">&quot;centralizar&quot;</span>);
<a name="l00750"></a>00750     nomes_tags.push_back(<span class="stringliteral">&quot;negrito&quot;</span>);
<a name="l00751"></a>00751     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;insert_with_tags_by_name(<a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a>,Glib::ustring(<span class="stringliteral">&quot;TABELIONATO OLIVEIRA&quot;</span>),nomes_tags);
<a name="l00752"></a>00752     <a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;end();
<a name="l00753"></a>00753     nomes_tags.clear();
<a name="l00754"></a>00754     nomes_tags.push_back(<span class="stringliteral">&quot;centralizar&quot;</span>);
<a name="l00755"></a>00755     nomes_tags.push_back(<span class="stringliteral">&quot;font8&quot;</span>);
<a name="l00756"></a>00756     buffer.clear();
<a name="l00757"></a>00757     buffer = <span class="stringliteral">&quot;\nBel. Marcelino Cesar Medeiros\n&quot;</span>;
<a name="l00758"></a>00758     buffer += <span class="stringliteral">&quot;\nCPF: 174.630.841-981\n&quot;</span>;
<a name="l00759"></a>00759     buffer += <span class="stringliteral">&quot;Tabelião de Protesto de Títulos - 3º Tabelião de Notas\n&quot;</span>;
<a name="l00760"></a>00760     buffer += <span class="stringliteral">&quot;Av. Presidente Vargas, 329 Centro - Dourados-MS\n&quot;</span>;
<a name="l00761"></a>00761     buffer += <span class="stringliteral">&quot;Fones: (67) 3422-5311 / 2108-2550\n&quot;</span>;
<a name="l00762"></a>00762     buffer += <span class="stringliteral">&quot;tabelionatooliveira@tabelionatooliveira.com.br\n&quot;</span>;
<a name="l00763"></a>00763     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;insert_with_tags_by_name(<a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a>,Glib::ustring(buffer),nomes_tags);
<a name="l00764"></a>00764     <span class="comment">// Cabeçalho - End</span>
<a name="l00765"></a>00765     
<a name="l00766"></a>00766     <span class="comment">// Rodapé - Begin</span>
<a name="l00767"></a>00767     <a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;end();
<a name="l00768"></a>00768     buffer.clear();
<a name="l00769"></a>00769     <span class="keywordflow">for</span> (i=0; i &lt; 36; i++)
<a name="l00770"></a>00770         {
<a name="l00771"></a>00771         buffer += <span class="stringliteral">&quot;_&quot;</span>;
<a name="l00772"></a>00772         }
<a name="l00773"></a>00773     buffer += <span class="stringliteral">&quot;\n&quot;</span>;
<a name="l00774"></a>00774     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;insert_with_tag(<a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a>,Glib::ustring(buffer),<span class="stringliteral">&quot;centralizar&quot;</span>);
<a name="l00775"></a>00775     <a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a> = <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;end();
<a name="l00776"></a>00776     buffer.clear();
<a name="l00777"></a>00777     buffer = <span class="stringliteral">&quot;TESTAMENTOS - ESCRITURAS - PROCURAÇÕES\nFIRMAS - AUTENTICAÇÕES&quot;</span>;
<a name="l00778"></a>00778     nomes_tags.clear();
<a name="l00779"></a>00779     nomes_tags.push_back(<span class="stringliteral">&quot;centralizar&quot;</span>);
<a name="l00780"></a>00780     nomes_tags.push_back(<span class="stringliteral">&quot;font8&quot;</span>);
<a name="l00781"></a>00781     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;insert_with_tags_by_name(<a class="code" href="classIMPRIMIR.html#ade14b1119c70036238226fda42842622">iter</a>,Glib::ustring(buffer),nomes_tags);
<a name="l00782"></a>00782     <span class="comment">// Rodapé  - End</span>
<a name="l00783"></a>00783     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;get_bounds(<a class="code" href="classIMPRIMIR.html#aba0666759be4d7b3b40d2d8fecb2b91c">inicio</a>, <span class="keyword">final</span>);
<a name="l00784"></a>00784     <a class="code" href="classIMPRIMIR.html#a39eeb78540b154ed9eab33bc5f4b2e41">PVisualiza</a>-&gt;apply_tag_by_name(<span class="stringliteral">&quot;geral&quot;</span>, <a class="code" href="classIMPRIMIR.html#aba0666759be4d7b3b40d2d8fecb2b91c">inicio</a>, <span class="keyword">final</span>);
<a name="l00785"></a>00785     this-&gt;<a class="code" href="classIMPRIMIR.html#ac3446784c943bbff8e65a283b3f6548a">corpo</a>(buffer);
<a name="l00786"></a>00786     }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Gerado em Quarta, 9 de Maio de 2012 21:34:45 para Caixa-1.0.2 por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
